<form id="id_addOrder_form" name="name_addOrder_form" method="post" action ="<?php echo func::makeUrl('order', 'add'); ?>">
    <table class="addOrder_table">
        <tr>
            <th scope="row">Tên khách hàng</th>
            <td colspan="2">
                <select name="customerId">
                    <option value="">--Chọn khách hàng--</option>
                    <?php
                        while($aCustomerRow = mysql::fetchSql($aCustomer)){
                    ?>
                    <option value="<?php echo $aCustomerRow['customerId']; ?>"><?php echo $aCustomerRow['name']; ?></option>
                    <?php
                        }
                        $aCustomer->free();
                    ?>
                </select>
            </td>
        </tr>
        <tr>
            <th scope="row">Tên hàng hóa</th>
            <th scope="row">Số lượng (KG)</th>
            <th scope="row">Đơn giá (ngàn/KG)</th>
        </tr>
        <tr class="addOrder_field">
            <td class="addOrder_inventory">
                <select name="val[inventoryId][]">
                    <option value="">--Chọn hàng hóa--</option>
                    <?php
                        while($aInventoryRow = mysql::fetchSql($aInventory)){
                    ?>
                        <option value="<?php echo $aInventoryRow['inventoryId'].'.'.$aInventoryRow['title']; ?>"><?php echo $aInventoryRow['title']; ?></option>
                    <?php
                        }
                        $aInventory->free();
                    ?>
                </select>
            </td>
            <td class="addOrder_quantity"><input type="text" name="val[quantity][]" size="10" />x</td>
            <td class="addOrder_price"><input type="text" name="val[price][]" size="10" /></td>            
        </tr>
    </table>
    <table>
        <tr>
            <th scope="row">Giao hàng</th>
            <td><input type="checkbox" name="delivered" value="1"/></td>
        </tr>
        <tr>
            <td colspan="2"><input type="button" name="addField" value="Thêm hàng hóa" /><input type="submit" name="addOrderButton" value="Thêm đơn đặt hàng" /></td>
        </tr>
    </table>
</form>